﻿using System;
using System.Diagnostics;
using System.IO;
using Google.ProtocolBuffers;
using Google.ProtocolBuffers.Descriptors;
using Google.ProtocolBuffers.FieldAccess;

namespace com.gexin.rp.sdk.dto
{
	// Token: 0x02000021 RID: 33
	[DebuggerNonUserCode]
	public sealed class Button : GeneratedMessage<Button, Button.Builder>
	{
		// Token: 0x06000415 RID: 1045 RVA: 0x00008FB7 File Offset: 0x000071B7
		private Button()
		{
		}

		// Token: 0x17000201 RID: 513
		// (get) Token: 0x06000416 RID: 1046 RVA: 0x00008FD1 File Offset: 0x000071D1
		public static Button DefaultInstance
		{
			get
			{
				return Button.defaultInstance;
			}
		}

		// Token: 0x17000202 RID: 514
		// (get) Token: 0x06000417 RID: 1047 RVA: 0x00008FD8 File Offset: 0x000071D8
		public override Button DefaultInstanceForType
		{
			get
			{
				return Button.DefaultInstance;
			}
		}

		// Token: 0x17000203 RID: 515
		// (get) Token: 0x06000418 RID: 1048 RVA: 0x00002579 File Offset: 0x00000779
		protected override Button ThisMessage
		{
			get
			{
				return this;
			}
		}

		// Token: 0x17000204 RID: 516
		// (get) Token: 0x06000419 RID: 1049 RVA: 0x00008FDF File Offset: 0x000071DF
		public static MessageDescriptor Descriptor
		{
			get
			{
				return GtReq.internal__static_com_gexin_rp_sdk_dto_Button__Descriptor;
			}
		}

		// Token: 0x17000205 RID: 517
		// (get) Token: 0x0600041A RID: 1050 RVA: 0x00008FE6 File Offset: 0x000071E6
		protected override FieldAccessorTable<Button, Button.Builder> InternalFieldAccessors
		{
			get
			{
				return GtReq.internal__static_com_gexin_rp_sdk_dto_Button__FieldAccessorTable;
			}
		}

		// Token: 0x17000206 RID: 518
		// (get) Token: 0x0600041B RID: 1051 RVA: 0x00008FED File Offset: 0x000071ED
		public bool HasText
		{
			get
			{
				return this.hasText;
			}
		}

		// Token: 0x17000207 RID: 519
		// (get) Token: 0x0600041C RID: 1052 RVA: 0x00008FF5 File Offset: 0x000071F5
		public string Text
		{
			get
			{
				return this.text_;
			}
		}

		// Token: 0x17000208 RID: 520
		// (get) Token: 0x0600041D RID: 1053 RVA: 0x00008FFD File Offset: 0x000071FD
		public bool HasNext
		{
			get
			{
				return this.hasNext;
			}
		}

		// Token: 0x17000209 RID: 521
		// (get) Token: 0x0600041E RID: 1054 RVA: 0x00009005 File Offset: 0x00007205
		public int Next
		{
			get
			{
				return this.next_;
			}
		}

		// Token: 0x1700020A RID: 522
		// (get) Token: 0x0600041F RID: 1055 RVA: 0x00008D7F File Offset: 0x00006F7F
		public override bool IsInitialized
		{
			get
			{
				return true;
			}
		}

		// Token: 0x06000420 RID: 1056 RVA: 0x00009010 File Offset: 0x00007210
		public override void WriteTo(ICodedOutputStream output)
		{
			this.CalcSerializedSize();
			string[] buttonFieldNames = Button._buttonFieldNames;
			if (this.hasText)
			{
				output.WriteString(1, buttonFieldNames[1], this.Text);
			}
			if (this.hasNext)
			{
				output.WriteInt32(2, buttonFieldNames[0], this.Next);
			}
			this.UnknownFields.WriteTo(output);
		}

		// Token: 0x1700020B RID: 523
		// (get) Token: 0x06000421 RID: 1057 RVA: 0x00009068 File Offset: 0x00007268
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				return this.CalcSerializedSize();
			}
		}

		// Token: 0x06000422 RID: 1058 RVA: 0x00009088 File Offset: 0x00007288
		private int CalcSerializedSize()
		{
			int num = this.memoizedSerializedSize;
			if (num != -1)
			{
				return num;
			}
			num = 0;
			if (this.hasText)
			{
				num += CodedOutputStream.ComputeStringSize(1, this.Text);
			}
			if (this.hasNext)
			{
				num += CodedOutputStream.ComputeInt32Size(2, this.Next);
			}
			num += this.UnknownFields.SerializedSize;
			this.memoizedSerializedSize = num;
			return num;
		}

		// Token: 0x06000423 RID: 1059 RVA: 0x000090E8 File Offset: 0x000072E8
		public static Button ParseFrom(ByteString data)
		{
			return Button.CreateBuilder().MergeFrom(data).BuildParsed();
		}

		// Token: 0x06000424 RID: 1060 RVA: 0x000090FA File Offset: 0x000072FA
		public static Button ParseFrom(ByteString data, ExtensionRegistry extensionRegistry)
		{
			return Button.CreateBuilder().MergeFrom(data, extensionRegistry).BuildParsed();
		}

		// Token: 0x06000425 RID: 1061 RVA: 0x0000910D File Offset: 0x0000730D
		public static Button ParseFrom(byte[] data)
		{
			return Button.CreateBuilder().MergeFrom(data).BuildParsed();
		}

		// Token: 0x06000426 RID: 1062 RVA: 0x0000911F File Offset: 0x0000731F
		public static Button ParseFrom(byte[] data, ExtensionRegistry extensionRegistry)
		{
			return Button.CreateBuilder().MergeFrom(data, extensionRegistry).BuildParsed();
		}

		// Token: 0x06000427 RID: 1063 RVA: 0x00009132 File Offset: 0x00007332
		public static Button ParseFrom(Stream input)
		{
			return Button.CreateBuilder().MergeFrom(input).BuildParsed();
		}

		// Token: 0x06000428 RID: 1064 RVA: 0x00009144 File Offset: 0x00007344
		public static Button ParseFrom(Stream input, ExtensionRegistry extensionRegistry)
		{
			return Button.CreateBuilder().MergeFrom(input, extensionRegistry).BuildParsed();
		}

		// Token: 0x06000429 RID: 1065 RVA: 0x00009157 File Offset: 0x00007357
		public static Button ParseDelimitedFrom(Stream input)
		{
			return Button.CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
		}

		// Token: 0x0600042A RID: 1066 RVA: 0x00009169 File Offset: 0x00007369
		public static Button ParseDelimitedFrom(Stream input, ExtensionRegistry extensionRegistry)
		{
			return Button.CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
		}

		// Token: 0x0600042B RID: 1067 RVA: 0x0000917C File Offset: 0x0000737C
		public static Button ParseFrom(ICodedInputStream input)
		{
			return Button.CreateBuilder().MergeFrom(input).BuildParsed();
		}

		// Token: 0x0600042C RID: 1068 RVA: 0x0000918E File Offset: 0x0000738E
		public static Button ParseFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
		{
			return Button.CreateBuilder().MergeFrom(input, extensionRegistry).BuildParsed();
		}

		// Token: 0x0600042D RID: 1069 RVA: 0x00002579 File Offset: 0x00000779
		private Button MakeReadOnly()
		{
			return this;
		}

		// Token: 0x0600042E RID: 1070 RVA: 0x000091A1 File Offset: 0x000073A1
		public static Button.Builder CreateBuilder()
		{
			return new Button.Builder();
		}

		// Token: 0x0600042F RID: 1071 RVA: 0x000091A8 File Offset: 0x000073A8
		public override Button.Builder ToBuilder()
		{
			return Button.CreateBuilder(this);
		}

		// Token: 0x06000430 RID: 1072 RVA: 0x000091A1 File Offset: 0x000073A1
		public override Button.Builder CreateBuilderForType()
		{
			return new Button.Builder();
		}

		// Token: 0x06000431 RID: 1073 RVA: 0x000091B0 File Offset: 0x000073B0
		public static Button.Builder CreateBuilder(Button prototype)
		{
			return new Button.Builder(prototype);
		}

		// Token: 0x06000432 RID: 1074 RVA: 0x000091B8 File Offset: 0x000073B8
		static Button()
		{
			FileDescriptor descriptor = GtReq.Descriptor;
		}

		// Token: 0x04000293 RID: 659
		private static readonly Button defaultInstance = new Button().MakeReadOnly();

		// Token: 0x04000294 RID: 660
		private static readonly string[] _buttonFieldNames = new string[]
		{
			"next",
			"text"
		};

		// Token: 0x04000295 RID: 661
		private static readonly uint[] _buttonFieldTags = new uint[]
		{
			16u,
			10u
		};

		// Token: 0x04000296 RID: 662
		public const int TextFieldNumber = 1;

		// Token: 0x04000297 RID: 663
		private bool hasText;

		// Token: 0x04000298 RID: 664
		private string text_ = "";

		// Token: 0x04000299 RID: 665
		public const int NextFieldNumber = 2;

		// Token: 0x0400029A RID: 666
		private bool hasNext;

		// Token: 0x0400029B RID: 667
		private int next_;

		// Token: 0x0400029C RID: 668
		private int memoizedSerializedSize = -1;

		// Token: 0x02000071 RID: 113
		[DebuggerNonUserCode]
		public sealed class Builder : GeneratedBuilder<Button, Button.Builder>
		{
			// Token: 0x17000430 RID: 1072
			// (get) Token: 0x06000A9E RID: 2718 RVA: 0x00002579 File Offset: 0x00000779
			protected override Button.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}

			// Token: 0x06000A9F RID: 2719 RVA: 0x00018EE7 File Offset: 0x000170E7
			public Builder()
			{
				this.result = Button.DefaultInstance;
				this.resultIsReadOnly = true;
			}

			// Token: 0x06000AA0 RID: 2720 RVA: 0x00018F01 File Offset: 0x00017101
			internal Builder(Button cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}

			// Token: 0x06000AA1 RID: 2721 RVA: 0x00018F18 File Offset: 0x00017118
			private Button PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					Button other = this.result;
					this.result = new Button();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}

			// Token: 0x17000431 RID: 1073
			// (get) Token: 0x06000AA2 RID: 2722 RVA: 0x00018F54 File Offset: 0x00017154
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}

			// Token: 0x17000432 RID: 1074
			// (get) Token: 0x06000AA3 RID: 2723 RVA: 0x00018F61 File Offset: 0x00017161
			protected override Button MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}

			// Token: 0x06000AA4 RID: 2724 RVA: 0x00018F69 File Offset: 0x00017169
			public override Button.Builder Clear()
			{
				this.result = Button.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}

			// Token: 0x06000AA5 RID: 2725 RVA: 0x00018F7E File Offset: 0x0001717E
			public override Button.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new Button.Builder(this.result);
				}
				return new Button.Builder().MergeFrom(this.result);
			}

			// Token: 0x17000433 RID: 1075
			// (get) Token: 0x06000AA6 RID: 2726 RVA: 0x00018FA4 File Offset: 0x000171A4
			public override MessageDescriptor DescriptorForType
			{
				get
				{
					return Button.Descriptor;
				}
			}

			// Token: 0x17000434 RID: 1076
			// (get) Token: 0x06000AA7 RID: 2727 RVA: 0x00008FD8 File Offset: 0x000071D8
			public override Button DefaultInstanceForType
			{
				get
				{
					return Button.DefaultInstance;
				}
			}

			// Token: 0x06000AA8 RID: 2728 RVA: 0x00018FAB File Offset: 0x000171AB
			public override Button BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}

			// Token: 0x06000AA9 RID: 2729 RVA: 0x00018FCE File Offset: 0x000171CE
			public override Button.Builder MergeFrom(IMessage other)
			{
				if (other is Button)
				{
					return this.MergeFrom((Button)other);
				}
				base.MergeFrom(other);
				return this;
			}

			// Token: 0x06000AAA RID: 2730 RVA: 0x00018FF0 File Offset: 0x000171F0
			public override Button.Builder MergeFrom(Button other)
			{
				if (other == Button.DefaultInstance)
				{
					return this;
				}
				this.PrepareBuilder();
				if (other.HasText)
				{
					this.Text = other.Text;
				}
				if (other.HasNext)
				{
					this.Next = other.Next;
				}
				this.MergeUnknownFields(other.UnknownFields);
				return this;
			}

			// Token: 0x06000AAB RID: 2731 RVA: 0x00019044 File Offset: 0x00017244
			public override Button.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}

			// Token: 0x06000AAC RID: 2732 RVA: 0x00019054 File Offset: 0x00017254
			public override Button.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				UnknownFieldSet.Builder builder = null;
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(Button._buttonFieldNames, text, StringComparer.Ordinal);
						if (num2 < 0)
						{
							if (builder == null)
							{
								builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
							}
							this.ParseUnknownField(input, builder, extensionRegistry, num, text);
							continue;
						}
						num = Button._buttonFieldTags[num2];
					}
					if (num == 0u)
					{
						throw InvalidProtocolBufferException.InvalidTag();
					}
					if (num != 10u)
					{
						if (num != 16u)
						{
							if (WireFormat.IsEndGroupTag(num))
							{
								if (builder != null)
								{
									this.UnknownFields = builder.Build();
								}
								return this;
							}
							if (builder == null)
							{
								builder = UnknownFieldSet.CreateBuilder(this.UnknownFields);
							}
							this.ParseUnknownField(input, builder, extensionRegistry, num, text);
						}
						else
						{
							this.result.hasNext = input.ReadInt32(ref this.result.next_);
						}
					}
					else
					{
						this.result.hasText = input.ReadString(ref this.result.text_);
					}
				}
				if (builder != null)
				{
					this.UnknownFields = builder.Build();
				}
				return this;
			}

			// Token: 0x17000435 RID: 1077
			// (get) Token: 0x06000AAD RID: 2733 RVA: 0x00019158 File Offset: 0x00017358
			public bool HasText
			{
				get
				{
					return this.result.hasText;
				}
			}

			// Token: 0x17000436 RID: 1078
			// (get) Token: 0x06000AAE RID: 2734 RVA: 0x00019165 File Offset: 0x00017365
			// (set) Token: 0x06000AAF RID: 2735 RVA: 0x00019172 File Offset: 0x00017372
			public string Text
			{
				get
				{
					return this.result.Text;
				}
				set
				{
					this.SetText(value);
				}
			}

			// Token: 0x06000AB0 RID: 2736 RVA: 0x0001917C File Offset: 0x0001737C
			public Button.Builder SetText(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasText = true;
				this.result.text_ = value;
				return this;
			}

			// Token: 0x06000AB1 RID: 2737 RVA: 0x000191A9 File Offset: 0x000173A9
			public Button.Builder ClearText()
			{
				this.PrepareBuilder();
				this.result.hasText = false;
				this.result.text_ = "";
				return this;
			}

			// Token: 0x17000437 RID: 1079
			// (get) Token: 0x06000AB2 RID: 2738 RVA: 0x000191CF File Offset: 0x000173CF
			public bool HasNext
			{
				get
				{
					return this.result.hasNext;
				}
			}

			// Token: 0x17000438 RID: 1080
			// (get) Token: 0x06000AB3 RID: 2739 RVA: 0x000191DC File Offset: 0x000173DC
			// (set) Token: 0x06000AB4 RID: 2740 RVA: 0x000191E9 File Offset: 0x000173E9
			public int Next
			{
				get
				{
					return this.result.Next;
				}
				set
				{
					this.SetNext(value);
				}
			}

			// Token: 0x06000AB5 RID: 2741 RVA: 0x000191F3 File Offset: 0x000173F3
			public Button.Builder SetNext(int value)
			{
				this.PrepareBuilder();
				this.result.hasNext = true;
				this.result.next_ = value;
				return this;
			}

			// Token: 0x06000AB6 RID: 2742 RVA: 0x00019215 File Offset: 0x00017415
			public Button.Builder ClearNext()
			{
				this.PrepareBuilder();
				this.result.hasNext = false;
				this.result.next_ = 0;
				return this;
			}

			// Token: 0x04000371 RID: 881
			private bool resultIsReadOnly;

			// Token: 0x04000372 RID: 882
			private Button result;
		}
	}
}
